/*
 * @Author: Zhouhai 497675647@qq.com
 * @Date: 2022-11-16 18:02:06
 * @LastEditors: Zhouhai 497675647@qq.com
 * @LastEditTime: 2022-11-21 15:45:30
 */
import request from '@/utils/request'
import {SysRolePostDomain} from '@/type.d/system/rolePost';

// 查询角色和职责关联信息列表
export function listRolePost(query: SysRolePostDomain) {
  return request('/system/rolepost/list',{
    method: 'get',
    params: query
  })
}

// 查询角色和职责关联信息详细
export function getRolePost(rolePostId: string) {
  return request('/system/rolepost/' + rolePostId,{
    method: 'get'
  })
}

// 新增角色和职责关联信息
export function addRolePost(data: SysRolePostDomain[]) {
  return request('/system/rolepost',{
    method: 'post',
    data: data
  })
}

// 修改角色和职责关联信息
export function updateRolePost(data: SysRolePostDomain) {
  return request('/system/rolepost',{
    method: 'put',
    data: data
  })
}

// 删除角色和职责关联信息
export function delRolePost(rolePostId: string) {
  return request('/system/rolepost/rolePostIds/' + rolePostId,{
    method: 'delete'
  })
}

// 根据角色id删除角色和职责关联信息
export function delRolePostByRoleId(roleId: string) {
  return request('/system/rolepost/roleId/' + roleId,{
    method: 'delete'
  })
}